import time
f=open('m1_sorted.txt')
a=[int(i) for i in f]
start=time.time()
for i in range(len(a)-1):
    for j in range(len(a)-2,i-1,-1):
        if a[j]>a[j+1]:
            a[j],a[j+1]=a[j+1],a[j]

finish=time.time()
print('m1_sorted ', (finish - start)*1000,' milliseconds')



import time
f=open('m2_reverse.txt')
a=[int(i) for i in f]
start=time.time()
for i in range(len(a)-1):
    for j in range(len(a)-2,i-1,-1):
        if a[j]>a[j+1]:
            a[j],a[j+1]=a[j+1],a[j]

finish=time.time()
print('m2_reverse ', (finish - start)*1000,' milliseconds')




import time
f=open('m3_shuffle.txt')
a=[int(i) for i in f]
start=time.time()
for i in range(len(a)-1):
    for j in range(len(a)-2,i-1,-1):
        if a[j]>a[j+1]:
            a[j],a[j+1]=a[j+1],a[j]

finish=time.time()
print('m3_shuffle ', (finish - start)*1000,' milliseconds')